import { Link } from "react-router-dom";
import { Button } from "antd";
import { useNavigate } from "react-router-dom";

function Login() {
  const navigate = useNavigate();
  const navigateToAritcle = () => {
    navigate("/article/1001");
    // navigate("/article?id=1001&name=jack");
  };
  return (
    <div>
      <h3>login</h3>
      <Link to="/article">文章</Link>
      <p>
        <Button type="primary" onClick={navigateToAritcle}>
          文章
        </Button>
      </p>
    </div>
  );
}

export default Login;
